function mineReadFile(path) {
    return new Promise((resolve, reject) => {
        require('fs').readFile(path, (err, data) => {
            if (err) {
                reject(err)
            } else {
                resolve(data.toString())
            }
        })
    })
}

mineReadFile('./content.txt')
    .then(res => {
        console.log(res)
    }, err => {
        console.log(err)
    })